<template>
	<div class="card-header-box1">
		<el-form ref="queryForm" :inline="true">
			<el-row>
				<el-col :span="12">
					<el-form-item prop="postCode" label="评审时间:" style="width: 80%">
						<el-date-picker v-model="queryParams.time" type="date" value-format="YYYY-MM-DD" style="width: 100%" />
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item prop="job_status" label="阶段状态:" style="width: 80%">
						<ma-dict-select
							v-model="queryParams.job_status"
							dict-type="post_status"
							clearable
							placeholder="阶段状态"
							:List="jdstatuslist"
						></ma-dict-select>
					</el-form-item>
				</el-col>
			</el-row>
		</el-form>

		<div class="titlezi flex">
			<div class="flex-1">主编单位</div>
		</div>

		<div class="kuaibj mt20">
			<Cfupload :istable="true" labeltitle="送审函"></Cfupload>
			<Cfupload :istable="true" labeltitle="送审稿"></Cfupload>
			<Cfupload :istable="true" labeltitle="国内外标准对比"></Cfupload>
			<Cfupload :istable="false" labeltitle="专家意见汇总表"></Cfupload>
			<Cfupload :istable="false" labeltitle="其他材料"></Cfupload>

			<div class="titlezi flex">
				<div class="flex-1">评审专家及联系电话</div>
			</div>

			<div class="kuaibj">
				<el-button type="primary" small>新增</el-button>

				<el-table
					v-loading="loading"
					:data="list"
					stripe
					class="mt20"
					element-loading-background="rgba(0, 0, 0, 0.5)"
					element-loading-text="加载中..."
					header-row-class-name="table-header"
				>
					<el-table-column key="sex" label="单位名称" align="center" prop="sex">
						<template #default="scope">
							<el-input v-model="scope.row.sex" placeholder="单位名称"></el-input>
						</template>
					</el-table-column>
					<el-table-column key="sex" label="联系人" align="center" prop="sex">
						<template #default="scope">
							<el-input v-model="scope.row.sex" placeholder="联系人"></el-input>
						</template>
					</el-table-column>
					<el-table-column key="sex" label="联系电话" align="center" prop="sex">
						<template #default="scope">
							<el-input v-model="scope.row.sex" placeholder="联系电话"></el-input>
						</template>
					</el-table-column>
					<el-table-column key="sex" label="负责人" align="center" prop="sex">
						<template #default="scope">
							<el-input v-model="scope.row.sex" placeholder="负责人"></el-input>
						</template>
					</el-table-column>
					<el-table-column key="sex" label="负责人电话" align="center" prop="sex">
						<template #default="scope">
							<el-input v-model="scope.row.sex" placeholder="负责人电话"></el-input>
						</template>
					</el-table-column>
					<el-table-column label="操作" fixed="right" header-align="center" align="center" width="110">
						<template #default="scope">
							<el-icon style="color: #1491ff"><EditPen /></el-icon>
							<el-icon class="ml20" style="color: #fe6360"><Delete /></el-icon>
						</template>
					</el-table-column>
				</el-table>
			</div>
		</div>

		<div slot="footer" class="dialog-footer mt10">
			<el-button type="primary">保存</el-button>
			<el-button>取消</el-button>
		</div>
	</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { min } from 'xe-utils'

import { uploadBaseProps } from 'element-plus'
import TimeDialog from './components/timeDialog.vue'
import Cfupload from '@/components/cf-upload/index.vue'

import { router } from '@/router'

const queryParams = ref({ keywords: '', dept_id: '', job_status: '', min: '', max: '', startTime: '', endTime: '', zy: '', time: '' })
const queryForm = ref()
const datatimelist = ref([])
const loading = ref(false)
const zhanghaovisible = ref(false)
const beianvisible = ref(false)
const uploadvisible = ref(false)
const timevisible = ref(false)

const list = ref([
	{ name: 'aaa', sex: 1 },
	{ name: 'ccc', sex: 1 }
])
const zylist = [
	{ name: '1', value: 0 },
	{ name: '2', value: 1 },
	{ name: '3', value: 2 }
]
const bianzhilist = [
	{ name: '送审', value: 0 },
	{ name: '报批', value: 1 },
	{ name: '发布', value: 2 }
]
const jdstatuslist = [
	{ name: '正常', value: 0 },
	{ name: '滞销', value: 1 },
	{ name: '撤销', value: 2 },
	{ name: '归档', value: 3 }
]

const jobstatusoptions = [
	{ name: '全部', value: 0 },
	{ name: '在职', value: 1 },
	{ name: '离职', value: 2 }
]

const handleSearch = () => {
	console.log('搜索参数:', queryParams.value)
	// const { dateRange, ...searchParams } = searchFormState.value
	// const [startTime, endTime] = Array.isArray(dateRange) ? dateRange : [null, null]

	// // 搜索参数赋值
	// Object.assign(searchState, { ...searchParams, startTime, endTime })
	// searchData()
}

const godetail = () => {
	router.push({
		path: '/bzjddetail'
	})
}

const handleReset = () => {
	//addCacheLog('🔄 重置搜索')
	// // 重置搜索表单状态
	// searchFormState.value = { ...defaultFilter.value }
	// resetSearch()
}
</script>

<style lang="scss" scoped>
.card-header-box1 {
	display: flex;

	flex-direction: column;

	overflow-y: scroll;
	height: 100%;

	&::-webkit-scrollbar {
		display: none;
	}

	.titlezi {
		font-size: 16px;
		color: #333;
	}

	.kuaibj {
		background-color: #f5f6fa;
		padding: 20px;
		border-radius: 6px;
	}

	.fjsmzi {
		font-size: 12px;
		color: #606266;
		margin-left: 5px;
	}
}
</style>
